package com.peopledelete.controller;

import com.peopledelete.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author cyt
 * @create 2020-04-19 18:25
 */

@Controller
public class loginController {
    @Autowired
    UserServiceImpl userService;

    @RequestMapping("/login")
    public String login(String name, String password) {
        if (userService.login(name, password)) {
            return "index";
        } else {
            return "/login/login";
        }
    }
}
